package com.xie.service;

import com.xie.dao.TeacherMapper;
import com.xie.pojo.Teacher;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {

    private TeacherMapper teacherMapper;
    public void setTeacherMapper(TeacherMapper teacherMapper) {
        this.teacherMapper = teacherMapper;
    }

    public Teacher loginTeacher(Teacher teacher) {
        return teacherMapper.loginTeacher(teacher);
    }

    public int addTeacher(Teacher teacher) {
        return teacherMapper.addTeacher(teacher);
    }

    public List<Teacher> queryAllTeacher() {
        return teacherMapper.queryAllTeacher();
    }

    public int deleteTeacher(String tid) {
        return teacherMapper.deleteTeacher(tid);
    }

    public int updateTeacher(Teacher teacher) {
        return teacherMapper.updateTeacher(teacher);
    }

    public Teacher queryTeacher(String tid) {
        return teacherMapper.queryTeacher(tid);
    }
}
